#include<bits/stdc++.h>

using namespace std;

const int N = 1e6 + 10;

int n;
int a[N];

int partition(int a[], int low, int high){
	int pivot = a[low];
	
	while(low < high){
		while(low < high && a[high] >= pivot){
			high--;
		}
		a[low] = a[high];
		while(low < high && a[low] <= pivot){
			low++;
		}
		a[high] = a[low];
	}
	
	a[low] = pivot;
	return low;
}

void quick_sort(int a[], int low, int high){
	if(low < high){
		int pivot = partition(a,low,high);
		quick_sort(a,low,pivot-1);
		quick_sort(a,pivot+1,high);
	}
}

int main(){
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		scanf("%d", &a[i]);
	}
	
	quick_sort(a, 0, n-1);
	
	for(int i = 0; i < n; i++){
		printf("%d ", a[i]);
	}
	
	return 0;
} 
